<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
  <database name="default" defaultIdMethod="none">
    <table name="S_TIMEEXPENSELINE">
      <column name="S_TIMEEXPENSELINE_ID" primaryKey="true" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
      <column name="CREATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
      <column name="UPDATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="S_TIMEEXPENSE_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
      <column name="LINE" primaryKey="false" required="true" type="DECIMAL" size="10" autoIncrement="false"/>
      <column name="ISTIMEREPORT" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="DATEEXPENSE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="QTY" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="EXPENSEAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="C_CURRENCY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="CONVERTEDAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="S_RESOURCEASSIGNMENT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="NOTE" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
      <column name="ISINVOICED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_INVOICELINE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="INVOICEPRICE" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="C_UOM_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_ORDERLINE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_PROJECTPHASE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="C_PROJECTTASK_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="S_TIMETYPE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
      <column name="PROCESSED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="QTYINVOICED" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
      <column name="QTYREIMBURSED" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
      <column name="PRICEINVOICED" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
      <column name="PRICEREIMBURSED" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_INVOICELINE" name="CINVOICELINE_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_INVOICELINE_ID" foreign="C_INVOICELINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ORDERLINE" name="CORDERLINE_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECTPHASE" name="CPROJECTPHASE_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_PROJECTPHASE_ID" foreign="C_PROJECTPHASE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECTTASK" name="CPROJECTTASK_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_PROJECTTASK_ID" foreign="C_PROJECTTASK_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_UOM" name="CUOM_STIMEEXPENSELINE" onDelete="none">
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_STIMEEXPENSELINE" onDelete="none">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="SRESOURCEASSIGN_STELINE" onDelete="none">
        <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="S_TIMEEXPENSE" name="STIMEEXPENSE_LINE" onDelete="cascade">
        <reference local="S_TIMEEXPENSE_ID" foreign="S_TIMEEXPENSE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="S_TIMETYPE" name="STIMETYPE_STIMEEXPENSELINE" onDelete="none">
        <reference local="S_TIMETYPE_ID" foreign="S_TIMETYPE_ID"/>
      </foreign-key>
      <check>
        <rule><![CDATA[IsActive in ('Y','N')]]></rule>
      </check>
      <check>
        <rule><![CDATA[IsTimeReport in ('Y','N')]]></rule>
      </check>
      <check>
        <rule><![CDATA[IsInvoiced in ('Y','N')]]></rule>
      </check>
    </table>
  </database>
